package com.dps.recommend.layer.postrank;

import com.dps.recommend.ann.LayerAnn;
import com.dps.recommend.beans.DpsRequest;
import com.dps.recommend.beans.ProcessInterface;
import com.dps.recommend.beans.RecItemDps;
import com.dps.recommend.enums.LayerEnum;
import com.dps.recommend.utils.DpsBaseService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;


@Service
@LayerAnn(layer = LayerEnum.POSTRANK)
public class DpsAfterPostRank extends DpsBaseService implements ProcessInterface {


    @Override
    public <R extends RecItemDps> List doProcess(DpsRequest dpsRequest, List<R> list) {
        List<R> resultList = new ArrayList<>();
        String[] ignoreArr = ((String) dpsRequest.getRoad().getProperties().getOrDefault("ignoreProperties", "")).split(",", -1);
        return setOrigList(copyList(dpsRequest, list, resultList, ignoreArr), dpsRequest);
    }
}
